package com.yuch.controller;


//import org.omg.CORBA.Environment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.env.Environment;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/books")
public class BookController {

    @Value("${tempDir}")
    private String tempDir;

    @Autowired
    private Environment env;

    @GetMapping
    public String test(){
        System.out.println("nihao");
        System.out.println(tempDir);
        System.out.println(env.getProperty("baseDir"));
        return "helloWorld";
    }


}
